{extend name='main'}

{block name="button"}

{if auth("add")}
<button data-open='{:url("add")}' data-title="添加经销商" class='layui-btn layui-btn-sm layui-btn-primary' >添加经销商</button>
{/if}

<!--style ="VISIBILITY: hidden"  隐藏属性-->
{if auth("remove")}
<button  data-action='{:url("remove")}' data-csrf="{:systoken('remove')}" data-rule="id#{key}" class='layui-btn layui-btn-sm layui-btn-primary'>删除经销商</button>
{/if}

{/block}
{block name="content"}
<div  class="think-box-shadow">
    {include file='qiyeagent/index_search'}
    <table class="layui-table" lay-skin="line">
        {notempty name='list'}
        <thead>
        <tr>
            <th class='list-table-check-td think-checkbox'>
                <label><input data-auto-none data-check-target='.list-check-box' type='checkbox'></label>
            </th>
            <th class='layui-hide-xs' style="width:10%">企业LOGO</th>
            <th class='layui-hide-xs' style="width:10%">名称</th>
            <th class='layui-hide-xs' style="width:10%">经营类别</th>
            <th class='layui-hide-xs' style="width:10%">企业规模</th>
            <th class='layui-hide-xs' style="width:10%">联系人</th>
            <th class='layui-hide-xs' style="width:10%">联系电话</th>
            <th class='layui-hide-xs' style="width:10%">最后更新时间</th>
            <th class='layui-hide-xs' style="width:10%">操作</th>
        </tr>
        </thead>
        {/notempty}
        <tbody>
        {foreach $list as $key=>$vo}


        <tr  data-dbclick>
            <td class='list-table-check-td think-checkbox'>
                <label><input class="list-check-box" value='{$vo.id}' type='checkbox'></label>
            </td>
            <td class="nowrap"><img src="{$vo.logo}" height="40px;width:40px;" /></td>
            <td class="nowrap">{$vo.name}</td>
            <td class="nowrap">{$vo.scope}</td>
            <td class="nowrap">{$vo.scale}</td>
            <td class="nowrap" >{$vo.contacts}</td>
            <td class="nowrap" >{$vo.phone}</td>
            <td class="nowrap">{$vo.update_at|format_datetime='Y-m-d H:i'}</td>
            <td  class='text-center nowrap notselect'>
                {if auth("edit")}
                <a data-dbclick class="layui-btn layui-btn-sm" data-title="编辑信息" data-open='{:url("edit")}?id={$vo.id}'>编 辑</a>
                {/if}
            </td>
        </tr>

        {/foreach}
        </tbody>
    </table>
    {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
</div>
{/block}


